#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2020-08-26 14:48:10
# @Author  : Zuo Zhongfei (zuozhongfei@126.com)
# @Link    : www
# @Version : $Id$

import os


class Dog():
    """定义类"""

    def __init__(self, name, age):
        self.name = name
        self.age = age

    def sit(self):
        print(self.name.title() + " is now sitting.")

    def roll_over(self):
        print(self.name.title() + " rolled over")


my_dog = Dog("wangcai", 12)
print("My dog's name is " + my_dog.name.title())
print("My dog's name is " + str(my_dog.age) + " years old")

# 调用方法
my_dog.sit()
my_dog.roll_over()

your_dog = Dog("jingba", 4)
your_dog.sit()
